home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 6
/
CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso
/
cucd
/
prog
/
mui
/
modula
/
doc
/
muiclasssupport.doc
next >
Wrap
Text File
|
1996-08-14
|
5KB
|
167 lines
TABLE OF CONTENTS
MuiClassSupport/---information---
MuiClassSupport/DoSuperNew
MuiClassSupport/InitClass
MuiClassSupport/RemoveClass
MuiClassSupport/setSuper
MuiClassSupport/---information--- MuiClassSupport/---information---
VERSION
$Id: MuiClassSupport.mod 1.4 1996/08/14 01:39:07 olf Exp olf $
COPYRIGHT
written and (c) 1996 by Olaf 'Olf' Peters
report bugs, suggestions, comments to
olf@informatik.uni-bremen.de
op@hb2.maus.de (no mail larger than 16 KB to this address!)
MuiClassSupport/DoSuperNew MuiClassSupport/DoSuperNew
NAME
DoSuperNew - create an instance of your superclass.
SYNOPSIS
DoSuperNew(cl : IClassPtr;
obj : ObjectPtr ;
attrList : TagItemPtr) : ADDRESS ;
FUNCTION
calls the OM_NEW method for the superclass to create an instance
of your custom-class. Most likely you will call this in the
NEW-Method of your customclass.
INPUTS
cl - a pointer to a customclass structure, if DoSuperMethod
ist called from the NEW method of your customclass, use
the ClassPtr you got as parameter for your NEW method.
obj - also use the ObjectPtr you got as parameter for your
NEW method.
attrList - a taglist to set attributes of the superclass your
customclass is an instance of.
RESULT
an instance of your customclass.
SEE ALSO
amiga.lib/DoSuperMethodA
MuiClassSupport/InitClass MuiClassSupport/InitClass
NAME
InitClass -- init MUI-CustomClass structure
SYNOPSIS
InitClass(VAR mcc : mCustomClassPtr;
base : LibraryPtr ;
supername : StrPtr ;
supermcc : mCustomClassPtr ;
datasize : LONGINT ;
dispatcher : DispatcherDef) : BOOLEAN ;
FUNCTION
Easily allocate and initialize a MUI-CustomClass structure.
Be sure to call RemoveClass when you're done with the class (most
likely InitClass() will be called from the startup-code of a
module whereas RemoveClass will be called from the closing code.)
INPUTS
mcc -
the structure to be initialized. It will also be
allocated for you, so be sure to not handle a valid
pointer to InitClass(), it will be overwritten!
base,
supername,
supermcc,
datasize - see muimaster.library/MUI_CreateCustomClass
dispatcher - this is the dispatcher function of your customclass,
it must match the following prototype:
PROCEDURE ( (* class *) id.IClassPtr,
(* object *) ADDRESS,
(* message *) ADDRESS) : ADDRESS;
No need to call MakeDispatcher as InitClass does this
for you.
RESULT
TRUE if the initialization was successful, FALSE otherwise
EXAMPLE
IMPLEMENTATION MODULE TestClass ;
[...]
BEGIN
IF NOT (InitClass(class1, NIL, ADR(mcPopobject), NIL,
SIZE(Class1Data), Class1Dispatcher) AND
InitClass(class2, NIL, NIL, class1,
SIZE(Class2Data), Class2Dispatcher)) THEN
[Fail]
END ;
CLOSE
RemoveClass(class2) ;
RemoveClass(class1) ;
END TestClass .
This will create the to classes class1 and class2 where class1 is
a subclass of mcPopobject and class2 is a subclass of class1.
SEE ALSO
MuiClassSupport/RemoveClass
muimaster.library/MUI_CreateCustomClass
MuiClassSupport/RemoveClass MuiClassSupport/RemoveClass
NAME
RemoveClass - dispose of a MUI-CustomClass
SYNOPSIS
RemoveClass(VAR mcc : mCustomClassPtr) ;
FUNCTION
dispose of aMUI-CustomClass that has been initialised with
InitClass()
INPUTS
mcc - the customclass to dispose of, may also be NIL.
Note that this is a VAR parameter, it will be set to NIL after the
call, so it is safe to call RemoveClass() more often on the same
structure without any bad results.
SEE ALSO
MuiClassSupport/InitClass
MuiClassSupport/setSuper MuiClassSupport/setSuper
NAME
setSuper -- set attribute of a superclass
SYNOPSIS
setSuper(cl : IClassPtr ;
obj : ObjectPtr ;
attr : LONGCARD ;
value : LONGINT) ;
FUNCTION
Set an attribute of the superclass of an object.
INPUTS
cl - pointer to the customclass structure of your class.
obj - pointer to the instance of your customclass on which's
superclass the attribute should be set.
attr - the attribute of your superclass to be set
value - the attribute value
SEE ALSO
amiga.lib/SetSuperAttrs